package com.zhkc.iess.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

@Schema(description = "登录信息")
@Data
public class LoginInfoDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 4057608690086571281L;

    @Schema(description = "账号",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank
    @Size(max = 20)
    @Pattern(regexp = "^$|^[a-zA-Z0-9\\u4E00-\\u9FA5]+$", message = "姓名支持中文、字母、数字")
    private String account;

    @Schema(description = "密码",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "密码不能为空")
    @Size(max = 16)
//    @Pattern(regexp = "/^(?!.*\\s)(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*[\\W_]).{8,16}$/", message = "密码格式错误")
    private String password;

    @Schema(description = "验证码",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "验证码不能为空")
    @Size(max = 4)
    private String cpCode;

    @Schema(description = "uuid",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank()
    @Size(max = 32)
    private String uuid;

}
